<?php
/**
 * @author Mazvv
 * @package WelcomeManagement
 */
class Welcome extends CRM_Controller {
	private $objectsList = array();
	private $default_layout = "main_layout";
	
	
	public function __construct()
	{
		parent::__construct();
		/* TODO: ��������� ��������� ����� ������������ */
		
		$this->lang->load('welcome');
		$this->objectsList['MENU_OBJECT'] = $this->menucontainer->RenderVerticalTreeMenu(); 
	}
	
	/**
	 * Remap - ������� � ����� ������������
	 *
	 * @author Mazvv
	 * @param $m_Name
	 * @return void
	 */
	public function _remap($m_Name){
		switch ($m_Name){
			case 'l': {$this->_login();break;}
			case 'c': {$this->_setnewpasswd();break;}
			default: $this->_index();
		}
	}
	
	
	/**
	 * ����� �� ���������
	 *
	 * @param void
	 * @return void
	 */
	private function _index(){
		$this->objectsList['GRID_OBJECT'] = "Main content";
		$this->_Render();
	}
	
	
	/**
	 * ��������� �������� � �������� �� ���������, ��������� � default_layout 
	 * 
	 * @author Mazvv
	 * @param void
	 * @return void
	 */
	private function _Render()	{
		$this->load->view('layouts/'.$this->default_layout, $this->objectsList);
	}
	
	
}
?>